<!DOCTYPE html>
<html>
<head>
    <title>用户</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="姓名"/>
            </i-col>
            <i-button class="btn btn-primary" @click="query">查询</i-button>
            <i-button class="btn btn-success" @click="searchDetail">搜索记录</i-button>
            <div style="display: block;float: right">
                <#if shiro.hasPermission("lanling:student:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                </#if>
                <#if shiro.hasPermission("lanling:student:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                </#if>
                <#if shiro.hasPermission("lanling:student:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                </#if>
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <i-form ref="formValidate" :model="student" :rules="ruleValidate" :label-width="80" class="form-horizontal">
            <Form-item label="学员姓名" prop="realname">
                <i-input v-model="student.realname" placeholder="学员姓名"/>
            </Form-item>
            <Form-item label="设置科目" prop="subjectIds">
                <i-select  v-model="student.subjectIds" multiple filterable label-in-value >
                    <i-option v-for="item in subjectList" :value="item.id"
                              :key="item.id">{{item.subjectName}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="手机号" prop="mobile">
                <i-input v-model="student.mobile" placeholder="手机号"/>
            </Form-item>
            <Form-item label="身份证" prop="idCard">
                <i-input v-model="student.idCard" placeholder="身份证"/>
            </Form-item>
            <Form-item label="登录密码" prop="passwordRecord">
                <i-input v-model="student.passwordRecord" placeholder="登录密码"/>
            </Form-item>
            <Form-item label="性别" prop="sex">
                <Radio-group v-model="student.sex">
                    <Radio label='1'>
                        <span>男</span></Radio>
                    <Radio label='2'>
                        <span>女</span></Radio>
                    <Radio label='3'>
                        <span>保密</span></Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="状态" prop="state">
                <Radio-group v-model="student.state">
                    <Radio label="1">
                        <span>启用</span></Radio>
                    <Radio label="2">
                        <span>禁用</span></Radio>
                    <Radio label="3">
                        <span>删除</span></Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
            </Form-item>
        </i-form>
    </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/lanling/student.js?_${.now?long}"></script>
</body>
</html>